<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/CoverReport.master"
    AutoEventWireup="true" CodeFile="CoverageAggregate.aspx.cs" Inherits="ContentPages_CoverageAggregate" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="rightColumn">
        <div id="rightTop">
            <span id="header">Coverage report for &nbsp;<asp:Label ID="lblprojName" runat="server"></asp:Label></span>
            <span id="date">
                <asp:Label ID="lblTime" runat="server" CssClass=""></asp:Label></span>
            <div id="headerStatement">
                <table border="0" cellpadding="0" cellspacing="0" class="coverageReport">
                    <tr>
                        <th colspan="6" style="height: 15px">
                            Statistics of &nbsp;<asp:Label ID="lblStatsName" runat="server"></asp:Label>
                        </th>
                    </tr>
                    <tr>
                        <th>
                            Covered
                        </th>
                        <th>
                        </th>
                        <th colspan="2">
                            Non-covered
                        </th>
                        <th colspan="2">
                            General Details
                        </th>
                    </tr>
                    <tr>
                        <td colspan="6">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Lines
                        </td>
                        <td align="right">
                            <asp:Label ID="lblCovLines" runat="server" Text="" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td>
                            Lines
                        </td>
                        <td align="right">
                            <asp:Label ID="lblNCLines" runat="server" Text="" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td>
                            Method / Class
                        </td>
                        <td align="left">
                            <asp:Label ID="lblMethodsPerClass" runat="server" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Lines (partially)
                        </td>
                        <td align="right">
                            <asp:Label ID="lblParCovLines" runat="server" Text="" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td>
                            Blocks
                        </td>
                        <td align="right">
                            <asp:Label ID="lblNCBlocks" runat="server" Text="" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Classes
                        </td>
                        <td align="right" >
                            <asp:Label ID="lblCovClasses" runat="server" Text="" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td align="left">                            
                            Classes</td>
                        <td align="right">
                            &nbsp;
                            <asp:Label ID="lblNClasses" runat="server" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Blocks
                        </td>
                        <td align="right">
                            <asp:Label ID="lblCovBlocks" runat="server" Text="" CssClass="LableStatisticsData"></asp:Label>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                            &nbsp;</td>
                        <td>
                           
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="rightBottom">
            <div id="rightInside">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:GridView ID="gvCovAggregate" runat="server" AutoGenerateColumns="False" GridLines="Both"
                            OnRowCommand="gvCovAggregate_RowCommand" CssClass="GridViewMetricsStyle" OnRowDataBound="gvCovAggregate_RowDataBound">
                            <RowStyle CssClass="GridRowStyle" />
                            <FooterStyle CssClass="" />
                            <PagerStyle CssClass="" HorizontalAlign="Center" />
                            <SelectedRowStyle CssClass="" />
                            <HeaderStyle CssClass="GridViewAggregateHeaderStyle" />
                            <EditRowStyle CssClass="" />
                            <AlternatingRowStyle CssClass="GridAlternateRowStyle" />
                            <Columns>
                                <asp:TemplateField HeaderText="" HeaderStyle-Wrap="true" ItemStyle-Wrap="true" HeaderStyle-Width="520">
                                    <ItemTemplate>
                                        <table class="">
                                            <tr>
                                                <td style="width: 490px" align="left">
                                                    <asp:Label ID="lblFileCreation" runat="server" Text='<%# Bind("FileCreationTime")%>'></asp:Label>
                                                </td>
                                                <td style="width: 30px">
                                                    <asp:ImageButton ID="imgCloud" runat="server" ToolTip="Overall tag cloud report" ImageUrl="../App_Themes/ReportThemes/images/cloud.bmp"
                                                        CommandName="OpenCloud" CommandArgument='<%# gvCovAggregate.Rows.Count.ToString() %>' />
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Total Coverage" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <table id="Table1" class="" runat="server">
                                            <tr>
                                                <td style="width: 50px" align="right" id="totCover" runat="server">
                                                    <asp:Label ID="lbltotcov" runat="server" Text='<%# TruncateDouble((double)Eval("classCoveragePercentage"))%>'></asp:Label>
                                                </td>
                                                <td style="width: 150px" align="right">
                                                    <asp:Label ID="lblMajor" runat="server" CssClass="LabelMajor" Width='<%# SetLblMajorWidth((double)Eval("classCoveragePercentage"))%>'>&nbsp;</asp:Label><asp:Label
                                                        ID="lnlMinor" runat="server" CssClass="LabelMinor" Width='<%# SetLblMinorWidth((double)Eval("classCoveragePercentage"))%>'>&nbsp;</asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataFormatString="{0:0.00}" DataField="AvgClsFile" HeaderText="Average Class / File"
                                    HtmlEncode="false" HeaderStyle-Wrap="true" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right" >
                                    <HeaderStyle Wrap="True" />
                                </asp:BoundField>
                                <asp:BoundField DataFormatString="{0:0.00}" DataField="AvgMethodClass" HeaderText="Average Method / Class"
                                    HtmlEncode="false" HeaderStyle-Wrap="true" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right">
                                    <HeaderStyle Wrap="True" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Total Files" HeaderStyle-Wrap="true" HeaderStyle-Width="80"
                                    ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lbltotfiles" runat="server" Text='<%# Bind("TotalFiles")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Total Classes" HeaderStyle-Wrap="true" HeaderStyle-Width="80"
                                    ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lbltotclass" runat="server" Text='<%# Bind("TotalClasses")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Lines(including partial)" HeaderStyle-Wrap="true" HeaderStyle-Width="60"
                                    ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lblLines" runat="server" Text='<%# Bind("Lines")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Not Covered Lines" HeaderStyle-Wrap="true" HeaderStyle-Width="60"
                                    ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNCLines" runat="server" Text='<%# Bind("NClines")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <br />
                        <asp:GridView ID="gvAllNmspAgg" runat="server" CssClass="GridViewMetricsStyle" AutoGenerateColumns="False"
                            GridLines="Both" OnRowCommand="gvAllNmspAgg_RowCommand" AllowSorting="True" OnSorting="gvAllNmspAgg_Sorting"
                            OnRowCreated="gvAllNmspAgg_RowCreated" OnRowDataBound="gvAllNmspAgg_RowDataBound">
                            <RowStyle CssClass="GridRowStyle" />
                            <FooterStyle CssClass="" />
                            <PagerStyle CssClass="" HorizontalAlign="Center" />
                            <SelectedRowStyle CssClass="" />
                            <HeaderStyle CssClass="GridViewAggregateHeaderStyle" />
                            <EditRowStyle CssClass="" />
                            <AlternatingRowStyle CssClass="GridAlternateRowStyle" />
                            <Columns>
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblModName" runat="server" Text='<%# Bind("ModuleName")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Namespace Name" HeaderStyle-Wrap="true" HeaderStyle-Width="400"
                                    ItemStyle-Wrap="true" SortExpression="NamespaceName">
                                    <ItemTemplate>
                                        <table class="">
                                            <tr>
                                                <td style="width: 370px" align="left">
                                                    <asp:LinkButton ID="lnkNsname" runat="server" Text='<%# Bind("NamespaceName")%>'
                                                        CommandName="LoadMaster" CommandArgument='<%# gvAllNmspAgg.Rows.Count.ToString() %>'></asp:LinkButton>
                                                </td>
                                                <td style="width: 30px">
                                                    <asp:ImageButton ID="imgCloud" runat="server" ImageUrl="../App_Themes/ReportThemes/images/cloud.bmp"
                                                        CommandName="OpenCloud" CommandArgument='<%# gvAllNmspAgg.Rows.Count.ToString() %>' />
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Total Coverage" HeaderStyle-Wrap="true" HeaderStyle-Width="200"
                                    SortExpression="NsCovPercentage" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <table class="">
                                            <tr>
                                                <td style="width: 50px" align="Right" runat="server" id="tdTotCov">
                                                    <asp:Label ID="lbltotcov" CssClass="CovPercentAlignment"  runat="server" Text='<%# TruncateDouble((double)Eval("NsCovPercentage"))%>'></asp:Label>
                                                </td>
                                                <td style="width: 150px" align="right">
                                                    <asp:Label ID="lblMajor" runat="server" CssClass="LabelMajor" Width='<%# SetLblMajorWidth((double)Eval("NsCovPercentage"))%>'>&nbsp;</asp:Label><asp:Label
                                                        ID="lnlMinor" runat="server" CssClass="LabelMinor" Width='<%# SetLblMinorWidth((double)Eval("NsCovPercentage"))%>'>&nbsp;</asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataFormatString="{0:0.00}" DataField="AvgClsFile" HeaderText="Average Class / File"
                                    HtmlEncode="false" HeaderStyle-Wrap="true" SortExpression="AvgClsFile" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right"  >
                                   
                                </asp:BoundField>
                                <asp:BoundField DataFormatString="{0:0.00}" DataField="AvgMtdClass" HeaderText="Average Method / Class"
                                    HtmlEncode="false" HeaderStyle-Wrap="true" SortExpression="AvgMtdClass" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right">
                                  
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Total Files" HeaderStyle-Wrap="true" SortExpression="TotFiles"
                                    HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right" >
                                    <ItemTemplate>
                                        <asp:Label ID="lbltotfiles" runat="server" Text='<%# Bind("TotFiles")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Total Classes" HeaderStyle-Wrap="true" SortExpression="TotClasses"
                                    HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right">
                                    <ItemTemplate>
                                        <asp:Label ID="lbltotclass" runat="server" Text='<%# Bind("TotClasses")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Lines(including partial)" HeaderStyle-Wrap="true" SortExpression="CovLines"
                                    HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Right"  >
                                    <ItemTemplate>
                                        <asp:Label ID="lblLines" runat="server" Text='<%# Bind("CovLines")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Not Covered Lines" HeaderStyle-Wrap="true" SortExpression="NCLines"
                                    HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Right"  >
                                    <ItemTemplate>
                                        <asp:Label ID="lblNCLines" runat="server" Text='<%# Bind("NCLines")%>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="True" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <br />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
    </div>
</asp:Content>
